const Koa = require("koa");
const parser = require("koa-bodyparser");
const cors = require("@koa/cors");
const router = require("./router");
const port = 8000;

const app = new Koa();
app
  .use(parser())
  .use(cors())
  .use(router.routes())
  .listen(port, () => {
    console.log(`listen on ${port}`);
  });
